function orderInfoSubmit() {
    let orderSettlementTime = convertDateFormat($('#datetime-datepicker').val());
    let orderPlaywith = $('#orderPlaywith option:selected').text();
    let orderDispatcher = $('#orderDispatcher').val();
    let orderLevel = $('#orderLevel').val();
    let orderWages = $('#orderWages').val();
    let orderReward = $('#orderReward').val();
    let orderTimeLong = $('#orderTimeLong').val();
    let orderCustomer = $('#orderCustomer option:selected').text();
    let orderGame = $('#orderGame').val();
    let orderPay = $('#orderPay').val();
    let orderGift = $('#orderGift').val();
    let orderEvaluate = $('#orderEvaluate').val();
    let orderNotes = $('#orderNotes').val();

    let orderRollCall = document.querySelector('input[name="rollCall"]:checked').value;
    let orderOverAccount = document.querySelector('input[name="overAccount"]:checked').value;

    let orderInfo = {
        orderSettlementTime : orderSettlementTime,
        orderPlaywith : orderPlaywith,
        orderDispatcher : orderDispatcher,
        orderLevel : orderLevel,
        orderWages : orderWages,
        orderReward : orderReward,
        orderTimeLong : orderTimeLong,
        orderCustomer : orderCustomer,
        orderGame : orderGame,
        orderPay : orderPay,
        orderGift : orderGift,
        orderEvaluate : orderEvaluate,
        orderNotes : orderNotes,
        orderRollCall : orderRollCall,
        orderOverAccount : orderOverAccount
    }
    $.ajax({
        type: "post",
        url:"/orderEnter/insertOrderInfo",
        cache: false,
        data: orderInfo,
        dataType:'json',
        success: function (data) {
            $('#datetime-datepicker').val(null);
            $("#orderPlaywith").val('0');
            $('#orderDispatcher').val(null);
            $('#orderLevel').val(null);
            $('#orderWages').val(null);
            $('#orderReward').val(null);
            $('#orderTimeLong').val(null);
            $("#orderCustomer").val('0');
            $('#orderGame').val(null);
            $('#orderPay').val(null);
            $('#orderGift').val(null);
            $('#orderEvaluate').val(null);
            $('#orderNotes').val(null);
            document.getElementById('customRadio4').checked = true;
            document.getElementById('customRadio6').checked = true;

            setMsg();
        },
        complete: function () {

        },
        error: function(res) {
            toastr.error('录入失败，检查录入数据是否正确！');
        }
    });

}

function setMsg() {
    let errMsg = '订单录入成功';
    if (errMsg != null && errMsg != '') {
        toastr.clear();
        toastr.success(errMsg);
    }
}


// function convertDateFormat(dateString) {
//     let date = dateString.replace(/-/g, '/');
//     let dateTime = date + ":00";
//     return dateTime;
// }

function convertDateFormat(dateString) {
    let dateTime = dateString + ":00";
    return dateTime;
}